﻿param( $newRollUpFile )

$w3wp = get-process w3wp -ea SilentlyContinue
if( $w3wp ) 
{ 
	$w3wp.Kill() 
}
$rollUpFile = gci "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\tfs" -include $(Split-Path $newRollUpFile -Leaf) -r
if( $rollUpFile )
{
	$rollUpFile.Delete()
}
$rollUpFile = gci "C:\Program Files\Microsoft Team Foundation Server 2010\Application Tier\Web Services\bin\Plugins" -include $(Split-Path $newRollUpFile -Leaf) -r
if( $rollUpFile )
{
	$rollUpFile.Delete()
}
copy $newRollUpFile "C:\Program Files\Microsoft Team Foundation Server 2010\Application Tier\Web Services\bin\Plugins"
copy  $newRollUpFile.Replace("dll","pdb") "C:\Program Files\Microsoft Team Foundation Server 2010\Application Tier\Web Services\bin\Plugins"
